<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "{{%opt_price}}".
 *
 * @property integer $id
 * @property integer $adspace_id
 * @property integer $solution_id
 * @property integer $bid_type
 * @property string $opt_cpm
 * @property string $opt_cpc
 * @property string $opt_ctr
 * @property string $base_price
 * @property string $price
 * @property integer $status
 * @property string $last_update
 */
class OptPrice extends \app\models\BaseAR
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%opt_price}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['adspace_id', 'solution_id', 'opt_cpm', 'base_price', 'price'], 'required'],
            [['adspace_id', 'solution_id', 'bid_type', 'status'], 'integer'],
            [['opt_cpm', 'opt_cpc', 'opt_ctr', 'base_price', 'price'], 'number'],
            [['last_update'], 'safe']
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'adspace_id' => 'Adspace ID',
            'solution_id' => 'Solution ID',
            'bid_type' => 'Bid Type',
            'opt_cpm' => 'Opt Cpm',
            'opt_cpc' => 'Opt Cpc',
            'opt_ctr' => 'Opt Ctr',
            'base_price' => 'Base Price',
            'price' => 'Price',
            'status' => 'Status',
            'last_update' => 'Last Update',
        ];
    }
}
